This application incorporates by reference Taiwanese application Serial No. 88116783, Filed Sep. 30, 1999.
1. Field of the Invention
The invention relates in general to a method of image sampling and an apparatus thereof, and more particularly to a method of sampling input image data of a digital image system in accordance with the methodology of approximation and recursion and an apparatus thereof.
2. Description of the Related Art
In the early stage of information technology, information is represented in text only. As information technology progresses, multi-media are becoming the general requirement to data users, especially PC users nowadays. The multi-media mean that forms of data in transmission include images and voice other than text. Therefore, many kinds of digital image scan systems have been developed in order to process a variety of image data. Scanners and digital cameras are the most popular digital image scan systems. In the following description, scanners are taken as an example and digital cameras can be inferred.
The resolution of common scanners is 300 dpi (dot per inch), 600 dpi, or 1200 dpi. Some scanners provide kinds of resolution for selection. For example, users can select formal resolution to scan complicated images to obtain better image quality. On the other hand, users can select lower resolution to scan simple images to save image scan time. Here the lower resolution of the two is defined as xe2x80x9cnon-optical resolutionxe2x80x9d.
However, when the non-optical resolution is selected, how to sample is an important factor that will affect the quality of images to be scanned. Common scanners with several kinds of resolution use the method of xe2x80x9cskipping points directlyxe2x80x9d to obtain non-optical resolution images. The method of xe2x80x9cskipping points directlyxe2x80x9d and the advantages thereof are further described in the following.
Referring to FIGS. 1a, 1b, and 1c, in order to make the description simple and explicit, a sloped straight line is taken as an example of an input image. Although the real situation is much more complicated than the straight line image, the concept can be applied similarly. FIG. 1a shows a sloped straight line L representing the input image. FIG. 1b shows partial results of scanning with formal resolution (for example, 1200 dpi), and FIG. 1c shows partial results of scanning by using the non-optical resolution (for example, 720 dpi). In FIG. 1b, points p1xcx9cp5 represent five successive points (or called image data) sampled along the straight line L with the formal resolution 1200 dpi.
Points p1xe2x80x2xcx9cp3xe2x80x2 in FIG. 1c are the results of skipping the points p2 and p4. A non-optical resolution image is obtained by directly skipping some points of an original image with the formal resolution. After the skipping, the image resolution can be lowered to the non-optical resolution.
However, in FIG. 1c, a disadvantage of aforementioned image sampling with non-optical resolution can be observed, which is a non-uniform saw-toothed pattern of the sampled image. Generally, a scanner accomplishes the process of xe2x80x9cskipping points directlyxe2x80x9d by the following steps. The sampled image data with formal resolution are firstly stored in storage media such as hardware in a PC. Then, the image data in the storage media are read. At last some of the image data are omitted by using an algorithm.
To sum up, conventional scanners with various kinds of resolution have two kinds of disadvantages as follows as the non-optical resolution is requested:
(1) The scanning quality is low, because the method of xe2x80x9cskipping points directlyxe2x80x9d causes an obvious saw-toothed pattern of the sampled image.
(2) Using the additional algorithm to skip points in image increases the processing time and cost as a whole.
It is therefore a primary object of the invention to provide a method of image sampling and an apparatus thereof. It can be applied in a digital image scan system. According to the method of image sampling and the apparatus thereof, a smooth scan curve can be obtained with the non-optical resolution. Also, the invention is performed in real time, which will shorten the processing time largely.
In order to accomplish the object of the invention, the invention provides an apparatus of image sampling, which is mounted in a digital image scan system. The apparatus samples an input image to produce a sequence of input image data. The digital image scan system provides a first parameter.
The apparatus of image sampling includes an adder, for receiving the first parameter and a second parameter to produce a carry bit and a sum; a first register, for receiving the sum and outputting the second parameter that feedbacks the adder; a first multiplexer, for outputting the first or the second parameter under the control of the carry bit; a multiplier, for receiving one in the sequence of input image data and the output of the first multiplexer to output a third parameter; an adder/subtracter, for doing addition or subtraction of the third parameter and a fourth parameter to output a fifth parameter under the control of the carry bit; a second multiplexer, for outputting the third or the fifth parameter under the control of the carry bit; a second register, for receiving the output of the second multiplexer and outputting the fourth parameter; and a divider, for receiving the output of the adder/subtracter to produce one of output image data under the control of the carry bit.
Additionally, the invention provides a method of image sampling which is applied in a digital image scan system. The digital image scan system provides a first parameter and samples an input image to produce a sequence of input image data. The method of image sampling includes steps as follows: First, initial values of a second parameter and a third parameter are given. Second, the second parameter is replaced by the sum of the first and the second parameters. A product of one in the sequence of input image data and the first parameter is obtained and set to be a fourth parameter. Next, the third parameter is replaced by the sum of the third and the fourth parameter. When the second parameter is larger than one, the product of the input image data and the second parameter is set to be a fifth parameter and the result of the third, parameter subtracted by the fifth parameter be one of output image data. Also, the third parameter is replaced by the fifth parameter. At last the method goes back to the second step.